package ruifeng.zcj.dig.ui.shopping;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import ruifeng.zcj.dig.R;
import ruifeng.zcj.dig.base.BaseBarFragment;
import ruifeng.zcj.dig.base.FragmentInfo;
import ruifeng.zcj.dig.ui.base.DepositFragment;
import ruifeng.zcj.dig.ui.home.change.ChangeMainFragment;
import ruifeng.zcj.mybase.base.BaseFragment;

/**
 * 商城
 * Created by Administrator on 2016/8/31 0031.
 */
public class ShoppingFragment extends DepositFragment {
    @Bind(R.id.activity_top_left)
    ImageView mActivityTopLeft;
    @Bind(R.id.activity_top_center)
    TextView mActivityTopCenter;
    @Bind(R.id.activity_top_right)
    ImageView mActivityTopRight;
    @Bind(R.id.activity_top_right_text)
    TextView mActivityTopRightText;
    @Bind(R.id.iv_pic)
    ImageView mIvPic;
    @Bind(R.id.home_fragment_img1)
    ImageView mHomeFragmentImg1;
    @Bind(R.id.home_fragment_text1)
    TextView mHomeFragmentText1;
    @Bind(R.id.home_fragment_relative1)
    RelativeLayout mHomeFragmentRelative1;
    @Bind(R.id.home_fragment_img2)
    ImageView mHomeFragmentImg2;
    @Bind(R.id.home_fragment_text2)
    TextView mHomeFragmentText2;
    @Bind(R.id.home_fragment_relative2)
    RelativeLayout mHomeFragmentRelative2;
    @Bind(R.id.home_fragment_img3)
    ImageView mHomeFragmentImg3;
    @Bind(R.id.home_fragment_text3)
    TextView mHomeFragmentText3;
    @Bind(R.id.home_fragment_relative3)
    RelativeLayout mHomeFragmentRelative3;
    @Bind(R.id.home_fragment_img4)
    ImageView mHomeFragmentImg4;
    @Bind(R.id.home_fragment_text4)
    TextView mHomeFragmentText4;
    @Bind(R.id.home_fragment_relative4)
    RelativeLayout mHomeFragmentRelative4;

    @Bind(R.id.color_name)
    TextView mColorName;
    @Bind(R.id.color)
    View mColor;

    @Override
    protected void initFragmentConfig(View view) {
        mActivityTopCenter.setText("商城");
        mColorName.setText("所有分类");
        mActivityTopLeft.setVisibility(View.INVISIBLE);
        mIvPic.setImageResource(R.drawable.banner_shopping);
        mColor.setBackgroundResource(R.drawable.yellow_h);

        mHomeFragmentImg1.setImageResource(R.drawable.classify_h);
        mHomeFragmentText1.setText("分类");
        mHomeFragmentImg2.setImageResource(R.drawable.shopping_cart_h);
        mHomeFragmentText2.setText("购物车");
        mHomeFragmentImg3.setImageResource(R.drawable.search_h);
        mHomeFragmentText3.setText("搜索");
        mHomeFragmentImg4.setImageResource(R.drawable.car_home);
        mHomeFragmentText4.setText("消息");


        super.initFragmentConfig(view);
    }

    @Override
    protected void addPage(ArrayList<String> tabTitles, ArrayList<FragmentInfo> fragmentInfos) {
        tabTitles.add("分类");
        fragmentInfos.add(new FragmentInfo(OneCategoryFragment.class, getBundle(1)));
    }

    @Override
    protected int getContentView() {
        return R.layout.fragment_shopp;
    }

    @Override
    protected void onFirstUserVisible() {

    }

    @Override
    protected void onUserVisible() {

    }

    @Override
    protected void onUserInvisible() {

    }

    @Override
    protected void cleanMemory() {

    }


    @OnClick({R.id.activity_top_right, R.id.iv_pic, R.id.home_fragment_relative1, R.id.home_fragment_relative2, R.id.home_fragment_relative3, R.id.home_fragment_relative4})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.activity_top_right:
                break;
            case R.id.iv_pic:
                break;
            case R.id.home_fragment_relative1:
                break;
            case R.id.home_fragment_relative2:
                break;
            case R.id.home_fragment_relative3:
                break;
            case R.id.home_fragment_relative4:
                break;
        }
    }
}
